.herb-detail-page {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
  font-family: var(--body-font);
  color: var(--text-color);
}

.herb-detail-page.loading,
.herb-detail-page.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.loading-spinner {
  border: 5px solid rgba(141, 77, 59, 0.2);
  border-top: 5px solid var(--primary-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1.5s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.herb-detail-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
  position: relative;
}

.back-button {
  position: absolute;
  left: 0;
  top: 0;
  background: none;
  border: none;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 1rem;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.back-button:hover {
  background-color: rgba(141, 77, 59, 0.1);
}

.herb-detail-header h1 {
  font-size: 2.5rem;
  margin: 10px 0;
  font-family: var(--header-font);
  color: var(--primary-color);
}

.herb-tags {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.category-tag {
  background-color: rgba(47, 99, 88, 0.1);
  color: var(--secondary-color);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.9rem;
}

.usage-tag {
  background-color: rgba(141, 77, 59, 0.1);
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.9rem;
}

.toxicity-tag {
  background-color: rgba(224, 67, 67, 0.1);
  color: #E04343;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.9rem;
}

.herb-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
}

@media (max-width: 992px) {
  .herb-content {
    grid-template-columns: 1fr;
  }
}

.herb-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.herb-image {
  width: 100%;
  height: 300px;
  background-color: rgba(228, 187, 151, 0.1);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.placeholder-image {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  color: #888;
  font-style: italic;
  background-color: rgba(228, 187, 151, 0.05);
}

.herb-basic-info {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 15px;
}

.herb-basic-info h3 {
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  font-size: 1.2rem;
  color: var(--primary-color);
}

.herb-basic-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.herb-basic-info li {
  padding: 8px 0;
  border-bottom: 1px dashed rgba(141, 77, 59, 0.1);
  display: flex;
  justify-content: space-between;
}

.herb-basic-info li:last-child {
  border-bottom: none;
}

.info-label {
  color: #666;
  font-size: 0.9rem;
}

.info-value {
  font-weight: 500;
  color: var(--text-color);
}

.tab-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 15px;
}

.tab-navigation button {
  flex: 1;
  min-width: calc(50% - 4px);
  padding: 10px;
  background-color: rgba(228, 187, 151, 0.1);
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  color: var(--text-color);
}

.tab-navigation button:hover {
  background-color: rgba(228, 187, 151, 0.2);
}

.tab-navigation button.active {
  background-color: var(--primary-color);
  color: white;
}

.herb-main-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 20px;
}

.tab-section {
  margin-bottom: 30px;
}

.tab-section:last-child {
  margin-bottom: 0;
}

.tab-section h3 {
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  font-size: 1.3rem;
  color: var(--primary-color);
}

/* 综合介绍标签样式 */
.herb-description {
  line-height: 1.6;
  margin-bottom: 20px;
}

.function-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.function-tag {
  background-color: rgba(47, 99, 88, 0.1);
  color: var(--secondary-color);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
}

.herb-pairs {
  padding-left: 20px;
  margin: 0;
}

.herb-pairs li {
  margin-bottom: 10px;
  line-height: 1.5;
}

.related-herbs-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.related-herb-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background-color: rgba(228, 187, 151, 0.05);
  border-radius: 4px;
  transition: background-color 0.2s;
}

.related-herb-item:hover {
  background-color: rgba(228, 187, 151, 0.1);
}

.relation-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 10px;
}

.related-herb-name {
  flex-grow: 1;
  font-weight: 500;
}

.relation-type {
  font-size: 0.85rem;
  color: #666;
}

.view-more-btn {
  margin-top: 10px;
  padding: 8px 15px;
  background-color: rgba(141, 77, 59, 0.1);
  border: none;
  border-radius: 4px;
  color: var(--primary-color);
  cursor: pointer;
  transition: background-color 0.2s;
}

.view-more-btn:hover {
  background-color: rgba(141, 77, 59, 0.2);
}

/* 药性特点标签样式 */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.property-card {
  background-color: rgba(228, 187, 151, 0.05);
  border-radius: 8px;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.property-card.wide {
  grid-column: span 2;
}

.property-card h4 {
  margin: 0 0 10px 0;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.property-value {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 15px;
  color: var(--text-color);
}

.property-scale {
  margin-top: auto;
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 0.8rem;
  color: #666;
}

.scale-bar {
  height: 8px;
  background-color: #eee;
  border-radius: 4px;
  position: relative;
}

.scale-indicator {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--primary-color);
  top: 50%;
  transform: translate(-50%, -50%);
}

.taste-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.taste-tag {
  padding: 6px 12px;
  background-color: rgba(228, 187, 151, 0.1);
  border-radius: 4px;
  font-size: 0.9rem;
  color: #666;
}

.taste-tag.active {
  background-color: rgba(141, 77, 59, 0.1);
  color: var(--primary-color);
  font-weight: 500;
}

.functions-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.function-bar {
  display: flex;
  align-items: center;
}

.function-name {
  width: 80px;
  font-size: 0.9rem;
}

.bar-container {
  flex-grow: 1;
  height: 12px;
  background-color: #eee;
  border-radius: 6px;
  overflow: hidden;
}

.bar {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 6px;
}

.meridian-chart {
  width: 100%;
  height: 300px;
  position: relative;
  background-color: rgba(228, 187, 151, 0.05);
  display: flex;
  justify-content: center;
  align-items: center;
}

.meridian-image {
  max-width: 100%;
  max-height: 100%;
  opacity: 0.8;
}

.meridian-point {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 3px solid white;
  box-shadow: 0 0 0 2px rgba(141, 77, 59, 0.3);
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.radar-chart-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.properties-analysis {
  padding: 15px;
  background-color: rgba(228, 187, 151, 0.05);
  border-radius: 8px;
  margin-top: 20px;
}

.properties-analysis p {
  margin: 0;
  line-height: 1.6;
}

/* 药材配伍标签样式 */
.relations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.relation-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.relation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 3px solid;
  background-color: rgba(228, 187, 151, 0.05);
}

.relation-herb-name {
  font-size: 1.1rem;
  font-weight: 500;
}

.relation-type-badge {
  padding: 4px 8px;
  border-radius: 4px;
  color: white;
  font-size: 0.8rem;
}

.relation-content {
  padding: 15px;
}

.relation-description {
  margin: 0 0 15px 0;
  line-height: 1.5;
  font-style: italic;
  color: #666;
}

.relation-herbs-info {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.herb-property {
  flex: 1;
}

.property-label {
  display: block;
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 4px;
}

.property-value {
  font-weight: 500;
}

.relation-strength {
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
}

.strength-label {
  display: block;
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 4px;
}

.strength-bar-container {
  height: 8px;
  background-color: #eee;
  border-radius: 4px;
  margin-bottom: 5px;
}

.strength-bar {
  height: 100%;
  border-radius: 4px;
}

.strength-value {
  display: block;
  text-align: right;
  font-size: 0.8rem;
  font-weight: 500;
}

.recommended-formulas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.formula-card {
  background-color: rgba(228, 187, 151, 0.05);
  border-radius: 8px;
  padding: 15px;
  border-left: 3px solid var(--primary-color);
}

.formula-card h4 {
  margin: 0 0 10px 0;
  color: var(--primary-color);
}

.formula-card p {
  margin: 5px 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* 历史评价标签样式 */
.historical-timeline {
  position: relative;
  padding-left: 30px;
  margin-bottom: 30px;
}

.historical-timeline:before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background-color: var(--border-color);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item:before {
  content: '';
  position: absolute;
  top: 5px;
  left: -38px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 4px solid rgba(228, 187, 151, 0.2);
}

.timeline-period {
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--primary-color);
}

.timeline-content {
  background-color: rgba(228, 187, 151, 0.05);
  border-radius: 8px;
  padding: 15px;
}

.historical-quote {
  margin: 0 0 10px 0;
  font-style: italic;
  line-height: 1.6;
}

.quote-source {
  text-align: right;
  color: #666;
  font-size: 0.9rem;
}

.version-changes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.version-card {
  background-color: rgba(228, 187, 151, 0.05);
  border-radius: 8px;
  padding: 15px;
  border-left: 3px solid var(--primary-color);
  transition: transform 0.2s;
}

.version-card:hover {
  transform: translateY(-5px);
}

.version-card h4 {
  margin: 0 0 10px 0;
  color: var(--primary-color);
}

.version-card p {
  margin: 0;
  line-height: 1.5;
}

.historical-summary {
  padding: 15px;
  background-color: rgba(228, 187, 151, 0.05);
  border-radius: 8px;
}

.historical-summary p {
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .herb-detail-header h1 {
    font-size: 2rem;
  }
  
  .properties-grid {
    grid-template-columns: 1fr;
  }
  
  .property-card.wide {
    grid-column: span 1;
  }
  
  .relations-grid {
    grid-template-columns: 1fr;
  }
  
  .recommended-formulas,
  .version-changes {
    grid-template-columns: 1fr;
  }
  
  .herb-detail-header {
    padding-top: 40px;
  }
} 